package cn.loioi.multi.service.impl.uesr;

import java.util.Date;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.loioi.multi.common.BaseServiceImpl;
import cn.loioi.multi.mysql.been.SysRoleMapper;
import cn.loioi.multi.mysql.model.SysRole;
import cn.loioi.multi.service.user.SysRoleService;

@Service
public class SysRoleServiceImpl extends BaseServiceImpl<SysRole> implements SysRoleService {
	private @Resource SysRoleMapper sysRoleMapper;

	@Override
	public int insert(SysRole record) {
		record.setCreateTime(new Date());
		return super.insert(record);
	}

	@Override
	public int update(SysRole record) {
		record.setUpdateTime(new Date());
		return super.update(record);
	}

	@Override
	protected SysRoleMapper mapper() {
		return sysRoleMapper;
	}

	@Override
	protected Class<SysRole> getGenericSuperclass() {
		return SysRole.class;
	}
}
